<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Admin User</title>
        <link href="./resources/css/admin.css" type="text/css" rel="stylesheet" />
        <link href="./resources/css/StyleAdmin.css" type="text/css" rel="stylesheet" />
    </head>
    <body>
        <h:form>
            <div id="container">

                <div id="banner">
                    <a href="http://www.facebook.com"> <img src="../images/banner2.jpg" width="960px" height="250px"/></a>
                </div><!--End #banner-->
                <div id="duongvien">
                    <img src="../images/2.png" width="960px" height="5px"/>
                </div>
                <div id="content">
                    <div id="primary">
                        <h1><h:outputText value="List User"/></h1>
                        <h2>
                            <h:selectOneMenu id="optionsearch" value="#{beanUser.optionsearch}">
                                <f:selectItem itemValue="Account" itemLabel="Account"/>
                                <f:selectItem itemValue="FullName" itemLabel="Full Name"/>
                            </h:selectOneMenu>
                            <h:inputText value="#{beanUser.valieSearch}"/>
                            <h:commandButton value="Search" action="#{beanUser.searchUser}"/>
                            <h:commandButton value="Reset" action="#{beanUser.resetUser}"/>
                        </h2>
                        <h:dataTable id="show" value="#{beanUser.listUser}" var="user" border="5">
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Account"/>
                                </f:facet>
                                <h:outputText value="#{user.account}"  rendered="#{not user.editUser}"/>
                            </h:column>

                             <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Email"/>
                                </f:facet>
                                <h:outputText value="#{user.email}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Type"/>
                                </f:facet>
                                <h:outputText value="#{user.type}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="FullName"/>
                                </f:facet>
                                <h:outputText value="#{user.fullname}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="BirthDay"/>
                                </f:facet>
                                <h:outputText value="#{user.birthdate}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Sex"/>
                                </f:facet>
                                <h:outputText value="#{user.sex}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Age"/>
                                </f:facet>
                                <h:outputText value="#{user.age}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="City"/>
                                </f:facet>
                                <h:outputText value="#{user.city}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Address"/>
                                </f:facet>
                                <h:outputText value="#{user.address}" rendered="#{not user.editUser}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Delete"/>
                                </f:facet>
                                <h:commandLink value="Delete" action="#{beanUser.delete(user.idUser)}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Detail"/>
                                </f:facet>
                                <h:commandLink value="Detail" action="#{beanUser.showDetail(user)}"/>
                            </h:column>
                            
                        </h:dataTable>

                    </div><!--End #primary-->
                    <div id="sidebar">
                        <ul>
                            <li><a href="#">User</a></li>
                            <div class="aa"></div>
                            <li><a href="#">Message</a></li>
                            <div class="aa"></div>
                        </ul>
                        <div id="sidebar_rong"></div>
                    </div><!--End #sidebar-->
                </div><!--End #content-->
                <div id="footer">
                    them cai gi vao day cho dep
                </div>
            </div>
        </h:form>

    </body>
</html>
